import React, {useState} from 'react'

export default function Login() {
  const [name, setName] = useState('');
  const [pwd, setPwd] = useState('');
  const login = ()=>{
    console.log(name);
    console.log(pwd);
  }
  return (
    <div>
      <p>登录页</p>
      <div>
        <span>用户名：</span>
        <input value={name} onChange={(e)=>setName(e.target.value)}></input>
      </div>
      <div>
        <span>密码：</span>
        <input value={pwd} onChange={(e)=>setPwd(e.target.value)}></input>
      </div>
      <button onClick={()=>login()}>登录</button>
    </div>
  )
}
